import 'package:flutter/material.dart'; // fim简便写法


//  ListView

void main() {
  runApp(MyApp());
}

// 基本结构
class MyApp extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      home: Scaffold(
        appBar: AppBar(title: Text('container  text')),
        body: HomeContent03(),
      ),
    );
  }
}


class HomeContent03 extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return Container(
      height: 180,
      child: ListView(
        scrollDirection: Axis.horizontal,
        children: <Widget>[
            Container(
              child: Text(
                '标题',
                textAlign: TextAlign.center,
                style: TextStyle(
                  fontSize: 28.0
                ),
              ),
              width: 180.0,
              color: Colors.orange,
            ),
            Container(
              child: Text(
                '标题',
                textAlign: TextAlign.center,
                style: TextStyle(
                  fontSize: 28.0
                ),
              ),
              width: 180.0,
              color: Colors.pink,
            ),
            Container(
              child: Text(
                '标题',
                textAlign: TextAlign.center,
                style: TextStyle(
                  fontSize: 28.0
                ),
              ),
              width: 180.0,
              color: Colors.yellow,
            ),
        ]
      )
    );
  }
}


class HomeContent02 extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return ListView(
      padding: EdgeInsets.all(10),
      children: <Widget>[
          Image.network("https://dss0.bdstatic.com/70cFuHSh_Q1YnxGkpoWK1HF6hhy/it/u=2496571732,442429806&fm=26&gp=0.jpg"),
          Container(
            child: Text(
              '标题',
              textAlign: TextAlign.center,
              style: TextStyle(
                fontSize: 28.0
              ),
            ),
          ),
          Image.network("https://dss0.bdstatic.com/70cFuHSh_Q1YnxGkpoWK1HF6hhy/it/u=2496571732,442429806&fm=26&gp=0.jpg"),
          Image.network("https://dss0.bdstatic.com/70cFuHSh_Q1YnxGkpoWK1HF6hhy/it/u=2496571732,442429806&fm=26&gp=0.jpg"),
          Image.network("https://dss0.bdstatic.com/70cFuHSh_Q1YnxGkpoWK1HF6hhy/it/u=2496571732,442429806&fm=26&gp=0.jpg"),
          Image.network("https://i1.hdslb.com/bfs/face/0cd621a535d99cc5eed5bd9243355c21d64a0e39.jpg@96w_96h_1c.webp"),
          Image.network("https://i1.hdslb.com/bfs/face/0cd621a535d99cc5eed5bd9243355c21d64a0e39.jpg@96w_96h_1c.webp"),
          Image.network("https://i1.hdslb.com/bfs/face/0cd621a535d99cc5eed5bd9243355c21d64a0e39.jpg@96w_96h_1c.webp")
      ],
    );
  }
}

// 本地图片
class HomeContent extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return ListView(
      padding: EdgeInsets.all(10),
      children: <Widget>[
        ListTile(
          leading: Image.network("https://i1.hdslb.com/bfs/face/0cd621a535d99cc5eed5bd9243355c21d64a0e39.jpg@96w_96h_1c.webp"),
          title: Text('适得府君书看了积分抗裂砂浆'),
          subtitle: Text('适得府君书看了积分抗裂砂浆适得府君书看了积分抗裂砂浆'),
        ),
        ListTile(
          leading: Icon(Icons.settings, size: 40),
          title: Text('适得府君书看了积分抗裂砂浆'),
          subtitle: Text('适得府君书看了积分抗裂砂浆适得府君书看了积分抗裂砂浆'),
        ),
        ListTile(
          title: Text('适得府君书看了积分抗裂砂浆'),
          subtitle: Text('适得府君书看了积分抗裂砂浆适得府君书看了积分抗裂砂浆'),
          trailing: Icon(Icons.home),
        ),
        ListTile(
          leading: Icon(Icons.pages, color: Colors.yellow),
          title: Text('适得府君书看了积分抗裂砂浆'),
          subtitle: Text('适得府君书看了积分抗裂砂浆适得府君书看了积分抗裂砂浆'),
        ),
      ],
    );
  }
}

